#ifndef TOOLFAKESELECT_H
#define TOOLFAKESELECT_H
#include "tool.h"
#include "Drawing.h"
#include "rendermanager.h"
#include "globalstates.h"

enum OP {NONE,SCALING, TRANSLATING};
enum AXIS {ALL,X_AXIS,Y_AXIS,Z_AXIS};

class ToolFakeSelect : virtual public Tool
{
    ToolFakeSelect();
    RenderManager* rend;
    GlobalStates* global;
    vector2<int> start, mousePos;
    vector3<int> start3d, end3d, tempPos;
    bool dragging;
    float scale;
    OP operation;
    AXIS axis;
    colour colourMask(const colour& c);
    void operationHandler();
public:
    string getType(){return "";};
    static Tool* getInstance();
    Result mouseMoveEvent(QMouseEvent *event);
    Result mousePressEvent(QMouseEvent *event);
    Result mouseReleaseEvent(QMouseEvent *event);
    Result keyPressEvent(QKeyEvent *event);
    void overlayDisplay();
    void display();
};

inline
colour ToolFakeSelect::colourMask(const colour &c){
    static const colour mask(0,0,255);
    return colour( c.r ^ mask.r , c.g ^ mask.g , c.b ^ mask.b );
}

#endif // TOOLFAKESELECT_H
